
var basePath="http://localhost:9090";

$(function () {
    $.ajax({
        url:basePath+"/message/getAll",
        type:"GET",
        success:function (result) {

        }
    });
});

function submit_form() {
    $.ajax({
        url:basePath+"/message/add",
        type:"POST",
        data:$('#add_form').serialize(),
        success:function (result) {
            alert("评论成功");
            window.location.href="index.jsp";
        },
        error:function (result) {
            alert("评论失败");
        }
    });
}